package com.lb.jwitter;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.ForeignKey;

@Entity
@Table (name="tbl_dkmh_dotdk")
public class Tbl_DKMH_DotDK implements Serializable {
   private static final long serialVersionUID = -1989579066723007050L;

   private Long id;
   private String ma;
   private String ten;
   private String maLoai;
   private Tbl_CTDT_DM_HocKyTrongNam hocKyId = null;
   private Date ngayBatDau;
   private Date ngayKetThuc;
   private Date ngayCapNhat;
   private String ghiChu;
   private Integer trangThai;
   private Tbl_CanBo canBoId = null;
   private Tbl_DKMH_DotDK dotDKTruocId = null;

   @Id
   @GeneratedValue
   public Long getId() {
	    return id;
   }
   public void setId(Long id) {
	    this.id= id;
   }

   public String getMa() {
   	return ma;
   }
   public void setMa(String ma) {
   	this.ma= ma;
   }

   public String getTen() {
   	return ten;
   }
   public void setTen(String ten) {
   	this.ten= ten;
   }

   public String getMaLoai() {
   	return maLoai;
   }
   public void setMaLoai(String maLoai) {
   	this.maLoai= maLoai;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="HocKyId")
   @ForeignKey(name="FK_tbl_CTDT_DM_HocKyTrongNam_tbl_DKMH_DotDK")
   public Tbl_CTDT_DM_HocKyTrongNam getHocKyId() {
	    return hocKyId;
   }
   public void setHocKyId(Tbl_CTDT_DM_HocKyTrongNam hocKyId) {
	    this.hocKyId=hocKyId;
   }

   public Date getNgayBatDau() {
   	return ngayBatDau;
   }
   public void setNgayBatDau(Date ngayBatDau) {
   	this.ngayBatDau= ngayBatDau;
   }

   public Date getNgayKetThuc() {
   	return ngayKetThuc;
   }
   public void setNgayKetThuc(Date ngayKetThuc) {
   	this.ngayKetThuc= ngayKetThuc;
   }

   public Date getNgayCapNhat() {
   	return ngayCapNhat;
   }
   public void setNgayCapNhat(Date ngayCapNhat) {
   	this.ngayCapNhat= ngayCapNhat;
   }

   public String getGhiChu() {
   	return ghiChu;
   }
   public void setGhiChu(String ghiChu) {
   	this.ghiChu= ghiChu;
   }

   public Integer getTrangThai() {
   	return trangThai;
   }
   public void setTrangThai(Integer trangThai) {
   	this.trangThai= trangThai;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="CanBoId")
   @ForeignKey(name="FK_tbl_CanBo_tbl_DKMH_DotDK")
   public Tbl_CanBo getCanBoId() {
	    return canBoId;
   }
   public void setCanBoId(Tbl_CanBo canBoId) {
	    this.canBoId=canBoId;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="DotDKTruocId")
   @ForeignKey(name="FK_tbl_DKMH_DotDK_tbl_DKMH_DotDK")
   public Tbl_DKMH_DotDK getDotDKTruocId() {
	    return dotDKTruocId;
   }
   public void setDotDKTruocId(Tbl_DKMH_DotDK dotDKTruocId) {
	    this.dotDKTruocId=dotDKTruocId;
   }
}//endClass 

